Patent Document 1 describes a device for which optical sensors are arrayed in the row direction and column direction. The device described in this document includes a shift register array that supplies vertical scanning signals, switches for connecting neighboring vertical signal wiring lines to each other, and a shift register array that controls the opening and closing of the switches, and enables a vertical binning operation by closing the above-mentioned switch.